package com.designpatterns.proxypattern.interceptor;

import java.lang.reflect.Method;

public class MyInterceptor implements Interceptor {
    public boolean before(Object proxy, Object target, Method method, Object[] args) {
        System.out.println("前置方法");
        return false;
    }

    public void repalce(Object proxy, Object target, Method method, Object[] args) {
        System.out.println("取代真实对象的方法");
    }

    public void after(Object proxy, Object target, Method method, Object[] args) {
        System.out.println("后置方法");
    }
}
